#ifndef HTTPD_INCLUDE_HTTP_REQUEST_H
#define HTTPD_INCLUDE_HTTP_REQUEST_H

#include "common.h"

struct http_request
{
    char method[16];
    char host[128];
    char version[32];
    char path[512];
    char content_type[64];
    char charset[32];
    int content_length;
    struct key_value_pair *parameter;
};

extern struct http_request *string_to_http_requeset(char *request_data);
extern void destroy_http_request(struct http_request *request);
extern int get_parameter(struct http_request *request, const char *key, char *value, int size);

#endif  /* HTTPD_INCLUDE_HTTP_REQUEST_H */
